body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

h1 {
    font-size: 80px;
    margin: 0;
    color: #776e65;
}

.score-container {
    display: inline-block;
    background: #bbada0;
    padding: 15px 25px;
    border-radius: 3px;
    text-align: center;
    margin-left: 20px;
}

#high-score {
    color: #ffd700;
    font-size: 25px;
    font-weight: bold;
}

.score-title {
    color: #eee4da;
    font-size: 13px;
    text-transform: uppercase;
}

#score {
    color: white;
    font-size: 25px;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 500px;
    height: 500px;
    background-color: #bbada0;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    position: relative;
}

.grid > div {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    font-weight: bold;
    color: #776e65;
    background-color: rgba(238, 228, 218, 0.35);
}

.grid > div[class^="tile-"] {
    background-color: #eee4da;
    color: #776e65;
}
body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

h1 {
    font-size: 80px;
    margin: 0;
    color: #776e65;
}

.score-container {
    display: inline-block;
    background: #bbada0;
    padding: 15px 25px;
    border-radius: 3px;
    text-align: center;
    margin-left: 20px;
}

.score-title {
    color: #eee4da;
    font-size: 13px;
    text-transform: uppercase;
}

#score {
    color: white;
    font-size: 25px;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 500px;
    height: 500px;
    background-color: #bbada0;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    position: relative;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.grid > div {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background-color: #eee4da;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    font-weight: bold;
    color: #776e65;
    transition: transform 0.1s ease-out;
}

.grid > div.move-animation {
    animation: bounce 0.2s ease-out;
}

.grid > div.merge-animation {
    animation: bounce 0.2s ease-out, pulse 0.2s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

h1 {
    font-size: 80px;
    margin: 0;
    color: #776e65;
}

.score-container {
    display: inline-block;
    background: #bbada0;
    padding: 15px 25px;
    border-radius: 3px;
    text-align: center;
    margin-left: 20px;
}

.score-title {
    color: #eee4da;
    font-size: 13px;
    text-transform: uppercase;
}

#score {
    color: white;
    font-size: 25px;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 500px;
    height: 500px;
    background-color: #bbada0;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    position: relative;
}

.grid > div {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    font-weight: bold;
    color: #776e65;
    background-color: rgba(238, 228, 218, 0.35);
}

.grid > div[class^="tile-"] {
    background-color: #eee4da;
    color: #776e65;
}
body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

h1 {
    font-size: 80px;
    margin: 0;
    color: #776e65;
}

.score-container {
    display: inline-block;
    background: #bbada0;
    padding: 15px 25px;
    border-radius: 3px;
    text-align: center;
    margin-left: 20px;
}

.score-title {
    color: #eee4da;
    font-size: 13px;
    text-transform: uppercase;
}

#score {
    color: white;
    font-size: 25px;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 500px;
    height: 500px;
    background-color: #bbada0;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    position: relative;
}

.grid > div {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background-color: #eee4da;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    font-weight: bold;
    color: #776e65;
}

.grid > div[class^="tile-"] {
    background-color: #eee4da;
    color: #776e65;
}

.game-over {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 2;
}

.audio-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1;
}

#music-toggle {
    background-color: #8f7a66;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#music-toggle:hover {
    background-color: #9c8a7a;
}

.game-over p {
    font-size: 60px;
    color: #776e65;
    margin: 0;
}

.game-over button {
    background: #8f7a66;
    color: #f9f6f2;
    border: none;
    padding: 15px 25px;
    font-size: 18px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 20px;
}

/* Tile colors */
.tile-2 {
    background-color: #eee4da !important;
    color: #776e65 !important;
}

.tile-4 {
    background-color: #ede0c8 !important;
    color: #776e65 !important;
}

.tile-8 {
    background-color: #f2b179 !important;
    color: white !important;
}

.tile-16 {
    background-color: #f59563 !important;
    color: white !important;
}

.tile-32 {
    background-color: #f67c5f !important;
    color: white !important;
}

.tile-64 {
    background-color: #f65e3b !important;
    color: white !important;
}

.tile-128 {
    background-color: #edcf72 !important;
    color: white !important;
}

.tile-256 {
    background-color: #edcc61 !important;
    color: white !important;
}

.tile-512 {
    background-color: #edc850 !important;
    color: white !important;
}

.tile-1024 {
    background-color: #edc53f !important;
    color: white !important;
}

.tile-2048 {
    background-color: #edc22e !important;
    color: white !important;
}
body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

h1 {
    font-size: 80px;
    margin: 0;
    color: #776e65;
}

.score-container {
    display: inline-block;
    background: #bbada0;
    padding: 15px 25px;
    border-radius: 3px;
    text-align: center;
    margin-left: 20px;
}

.score-title {
    color: #eee4da;
    font-size: 13px;
    text-transform: uppercase;
}

#score {
    color: white;
    font-size: 25px;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 500px;
    height: 500px;
    background-color: #bbada0;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    position: relative;
}

.grid > div {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    font-weight: bold;
    color: #776e65;
    background-color: rgba(238, 228, 218, 0.35);
}

.grid > div[class^="tile-"] {
    background-color: #eee4da;
    color: #776e65;
}
body {
    font-family: Arial, sans-serif;
    background-color: #faf8ef;
    color: #776e65;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

h1 {
    font-size: 80px;
    margin: 0;
    color: #776e65;
}

.score-container {
    display: inline-block;
    background: #bbada0;
    padding: 15px 25px;
    border-radius: 3px;
    text-align: center;
    margin-left: 20px;
}

.score-title {
    color: #eee4da;
    font-size: 13px;
    text-transform: uppercase;
}

#score {
    color: white;
    font-size: 25px;
    font-weight: bold;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    width: 500px;
    height: 500px;
    background-color: #bbada0;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    position: relative;
}

.grid > div {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background-color: #eee4da;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    font-weight: bold;
    color: #776e65;
}

.grid > div[class^="tile-"] {
    background-color: #eee4da;
    color: #776e65;
}

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(238, 228, 218, 0.73);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.game-over p {
    font-size: 60px;
    color: #776e65;
    margin: 0;
}

.game-over button {
    background: #8f7a66;
    color: #f9f6f2;
    border: none;
    padding: 15px 25px;
    font-size: 18px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 20px;
}

/* Tile colors */
.tile-2 {
    background-color: #eee4da;
    color: #776e65;
}

.tile-4 {
    background-color: #ede0c8;
    color: #776e65;
}

.tile-8 {
    background-color: #f2b179;
    color: white;
}

.tile-16 {
    background-color: #f59563;
    color: white;
}

.tile-32 {
    background-color: #f67c5f;
    color: white;
}

.tile-64 {
    background-color: #f65e3b;
    color: white;
}

.tile-128 {
    background-color: #edcf72;
    color: white;
}

.tile-256 {
    background-color: #edcc61;
    color: white;
}

.tile-512 {
    background-color: #edc850;
    color: white;
}

.tile-1024 {
    background-color: #edc53f;
    color: white;
}

.tile-2048 {
    background-color: #edc22e;
    color: white;
}
